package com.itheima.homework;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @Author 王加鑫
 * @Date 2021/5/19 20:04
 * @Version 1.0
 */
public class Demo02 {
    public static void main(String[] args) throws IOException {
        FileInputStream inputStream = new FileInputStream("E:/itcast/mn.jpg");
        FileOutputStream outputStream = new FileOutputStream("day12_file&字节流.txt/mn.jpg");

        byte[] bytes = new byte[1024];
        int len;
        while ((len = inputStream.read(bytes)) != -1){
            outputStream.write(bytes,0,len);
        }
        inputStream.close();
        outputStream.close();
    }
}
